/**
  ******************************************************************************
  * @file    main.c 
  * @author  MCD Application Team
  * @version V2.0
  * @date    05-May-2012
  * @brief   Main program body.
  ******************************************************************************
  * @attention
  *
  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
  * TIME. AS A RESULT, XICUTELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  * <h2><center>&copy; COPYRIGHT 2011 Xicutelectronics</center></h2>
  ******************************************************************************
  */ 


/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
 
#include "usb_lib.h"
#include "hw_config.h"
#include "includes.h"

#if defined TYPE_1_SENSOR
    #warning "------------- Type 1 sensor -------------";
#endif
#if defined TYPE_2_SENSOR
    #warning "------------- Type 2 sensor -------------";
#endif
#if defined TYPE_3_SENSOR
    #warning "------------- Type 3 sensor -------------";
#endif
#if defined TYPE_4_SENSOR
    #warning "------------- Type 4 sensor -------------";
#endif
#if defined TYPE_5_SENSOR
    #warning "------------- Type 5 sensor -------------";
#endif

#if defined BOARD_V1
    #warning "------- Hardware release board_V1 -------";
#endif

#if defined BOARD_V2
    #warning "------- Hardware release board_V2 -------";
#endif

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Extern variables ----------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/

/* Private functions ---------------------------------------------------------*/



/*******************************************************************************
* Function Name  : main.
* Description    : main routine.
* Input          : None.
* Output         : None.
* Return         : None.
*******************************************************************************/
int main(void)
{
    LedInit();
    PC_AppInit();
    SysTick_Config(SystemCoreClock / 1000);     //tick interrupt is 1ms

    while (1)
    {
        PC_AppProcess();
        LedProcess();
    }
}


#ifdef  USE_FULL_ASSERT
/*******************************************************************************
* Function Name  : assert_failed
* Description    : Reports the name of the source file and the source line number
*                  where the assert_param error has occurred.
* Input          : - file: pointer to the source file name
*                  - line: assert_param error line source number
* Output         : None
* Return         : None
*******************************************************************************/
void assert_failed(uint8_t* file, uint32_t line)
{ 
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while(1)
  {
  }
}
#endif

/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
